<div class="cities view">
<h2><?php  __('City');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('State'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $html->link($city['State']['name'], array('controller'=> 'states', 'action'=>'view', $city['State']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['name']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Edit City', true), array('action'=>'edit', $city['City']['id'])); ?> </li>
		<li><?php echo $html->link(__('Delete City', true), array('action'=>'delete', $city['City']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $city['City']['id'])); ?> </li>
		<li><?php echo $html->link(__('List Cities', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New City', true), array('action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List States', true), array('controller'=> 'states', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New State', true), array('controller'=> 'states', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Clasificados', true), array('controller'=> 'clasificados', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Clasificado', true), array('controller'=> 'clasificados', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Products', true), array('controller'=> 'products', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Product', true), array('controller'=> 'products', 'action'=>'add')); ?> </li>
		<li><?php echo $html->link(__('List Users', true), array('controller'=> 'users', 'action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New User', true), array('controller'=> 'users', 'action'=>'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Clasificados');?></h3>
	<?php if (!empty($city['Clasificado'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Categoria Id'); ?></th>
		<th><?php __('Video'); ?></th>
		<th><?php __('Codigo'); ?></th>
		<th><?php __('Titulo'); ?></th>
		<th><?php __('Ubicacion'); ?></th>
		<th><?php __('State Id'); ?></th>
		<th><?php __('City Id'); ?></th>
		<th><?php __('Descripcion'); ?></th>
		<th><?php __('Precio'); ?></th>
		<th><?php __('Vence'); ?></th>
		<th><?php __('Activo'); ?></th>
		<th><?php __('User Id'); ?></th>
		<th><?php __('Telefonos'); ?></th>
		<th><?php __('Direccion'); ?></th>
		<th><?php __('Filename'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($city['Clasificado'] as $clasificado):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $clasificado['id'];?></td>
			<td><?php echo $clasificado['categoria_id'];?></td>
			<td><?php echo $clasificado['video'];?></td>
			<td><?php echo $clasificado['codigo'];?></td>
			<td><?php echo $clasificado['titulo'];?></td>
			<td><?php echo $clasificado['ubicacion'];?></td>
			<td><?php echo $clasificado['state_id'];?></td>
			<td><?php echo $clasificado['city_id'];?></td>
			<td><?php echo $clasificado['descripcion'];?></td>
			<td><?php echo $clasificado['precio'];?></td>
			<td><?php echo $clasificado['vence'];?></td>
			<td><?php echo $clasificado['activo'];?></td>
			<td><?php echo $clasificado['user_id'];?></td>
			<td><?php echo $clasificado['telefonos'];?></td>
			<td><?php echo $clasificado['direccion'];?></td>
			<td><?php echo $clasificado['filename'];?></td>
			<td><?php echo $clasificado['created'];?></td>
			<td><?php echo $clasificado['modified'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'clasificados', 'action'=>'view', $clasificado['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'clasificados', 'action'=>'edit', $clasificado['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'clasificados', 'action'=>'delete', $clasificado['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $clasificado['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Clasificado', true), array('controller'=> 'clasificados', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Products');?></h3>
	<?php if (!empty($city['Product'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Category Id'); ?></th>
		<th><?php __('Nombre Empresa'); ?></th>
		<th><?php __('Direccion'); ?></th>
		<th><?php __('State Id'); ?></th>
		<th><?php __('City Id'); ?></th>
		<th><?php __('Url'); ?></th>
		<th><?php __('Descripcion'); ?></th>
		<th><?php __('Imagen'); ?></th>
		<th><?php __('File'); ?></th>
		<th><?php __('Video'); ?></th>
		<th><?php __('Telefono'); ?></th>
		<th><?php __('Activo'); ?></th>
		<th><?php __('Contacto'); ?></th>
		<th><?php __('Created'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($city['Product'] as $product):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $product['id'];?></td>
			<td><?php echo $product['category_id'];?></td>
			<td><?php echo $product['nombre_empresa'];?></td>
			<td><?php echo $product['direccion'];?></td>
			<td><?php echo $product['state_id'];?></td>
			<td><?php echo $product['city_id'];?></td>
			<td><?php echo $product['url'];?></td>
			<td><?php echo $product['descripcion'];?></td>
			<td><?php echo $product['imagen'];?></td>
			<td><?php echo $product['file'];?></td>
			<td><?php echo $product['video'];?></td>
			<td><?php echo $product['telefono'];?></td>
			<td><?php echo $product['activo'];?></td>
			<td><?php echo $product['contacto'];?></td>
			<td><?php echo $product['created'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'products', 'action'=>'view', $product['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'products', 'action'=>'edit', $product['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'products', 'action'=>'delete', $product['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $product['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New Product', true), array('controller'=> 'products', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Users');?></h3>
	<?php if (!empty($city['User'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Nombre'); ?></th>
		<th><?php __('Apellidos'); ?></th>
		<th><?php __('Password'); ?></th>
		<th><?php __('Email'); ?></th>
		<th><?php __('Celular'); ?></th>
		<th><?php __('Fijo'); ?></th>
		<th><?php __('Direccion'); ?></th>
		<th><?php __('State Id'); ?></th>
		<th><?php __('City Id'); ?></th>
		<th><?php __('Activo'); ?></th>
		<th><?php __('Created'); ?></th>
		<th><?php __('Modified'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($city['User'] as $user):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $user['id'];?></td>
			<td><?php echo $user['nombre'];?></td>
			<td><?php echo $user['apellidos'];?></td>
			<td><?php echo $user['password'];?></td>
			<td><?php echo $user['email'];?></td>
			<td><?php echo $user['celular'];?></td>
			<td><?php echo $user['fijo'];?></td>
			<td><?php echo $user['direccion'];?></td>
			<td><?php echo $user['state_id'];?></td>
			<td><?php echo $user['city_id'];?></td>
			<td><?php echo $user['activo'];?></td>
			<td><?php echo $user['created'];?></td>
			<td><?php echo $user['modified'];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'users', 'action'=>'view', $user['id'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'users', 'action'=>'edit', $user['id'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'users', 'action'=>'delete', $user['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $user['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('New User', true), array('controller'=> 'users', 'action'=>'add'));?> </li>
		</ul>
	</div>
</div>
